/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DomainModel;


/**
 *
 * @author Patrick
 */
public enum Weekday {

    SUN (1,"Sunday"),
    MON (2,"Monday"),
    TUE (3,"Tuesday"),
    WED (4, "Wednesday"),
    THU (5, "Thursday"),
    FRI (6, "Friday"),
    SAT (7,"Saturday"), 
    RVC (8, "Online");
    
    private int dayId;
    private String dayName;
    
    private Weekday(int pDayId, String pDayName) {
        this.dayId = pDayId;
        this.dayName = pDayName;
    }

    public int getDayId() {
        return dayId;
    }

    public String getDayName() {
        return dayName;
    }

    public static Weekday getDayById(int pDayId) {
        switch(pDayId) {
            case 1 : return Weekday.SUN;
            case 2 : return Weekday.MON;
            case 3 : return Weekday.TUE;
            case 4 : return Weekday.WED;
            case 5 : return Weekday.THU;
            case 6 : return Weekday.FRI;
            case 7 : return Weekday.SAT;
            case 8: return Weekday.RVC;
        }   
        return null;
    } 
}

